home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // Paint1.h
- //
- //***********************************************************************
-
- class CLine : public CObject
- {
- private:
- CPoint m_ptFrom;
- CPoint m_ptTo;
- UINT m_nWidth;
- COLORREF m_crColor;
-
- public:
- CLine (CPoint, CPoint, UINT, COLORREF);
- virtual void Draw (CDC*);
- };
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CMainWindow : public CFrameWnd
- {
- private:
- UINT m_nColor;
- UINT m_nWidth;
- CPoint m_ptFrom;
- CPoint m_ptTo;
- CObArray m_lineArray;
-
- void InvertLine (CDC*, CPoint, CPoint);
- void DeleteAllLines ();
-
- public:
- CMainWindow ();
- ~CMainWindow ();
-
- protected:
- afx_msg void OnPaint ();
- afx_msg void OnFileNew ();
- afx_msg void OnUpdateFileNewUI (CCmdUI*);
- afx_msg void OnFileExit ();
- afx_msg void OnWidth (UINT);
- afx_msg void OnUpdateWidthUI (CCmdUI*);
- afx_msg void OnColor (UINT);
- afx_msg void OnUpdateColorUI (CCmdUI*);
- afx_msg void OnLButtonDown (UINT, CPoint);
- afx_msg void OnMouseMove (UINT, CPoint);
- afx_msg void OnLButtonUp (UINT, CPoint);
-
- DECLARE_MESSAGE_MAP ()
- };
-